<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>属性选择器&amp;伪对象选择器 | My NoteBook</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        <meta name="author" content="Eagle">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-sectionx/sectionx.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../md/sass.html" />
    
    
    <link rel="prev" href="../md/weilei.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="4"
        data-chapter-title="属性选择器&amp;伪对象选择器"
        data-filepath="md/xzf.md"
        data-basepath=".."
        data-revision="Fri Jan 26 2018 15:02:18 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/1-css.html">
            
                
                    <a href="../md/1-css.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        css引入方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/element.html">
            
                
                    <a href="../md/element.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        元素关系
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3" data-path="md/weilei.html">
            
                
                    <a href="../md/weilei.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="4" data-path="md/xzf.html">
            
                
                    <a href="../md/xzf.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        属性选择器&amp;伪对象选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5" data-path="md/sass.html">
            
                
                    <a href="../md/sass.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        sass的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6" data-path="md/git.html">
            
                
                    <a href="../md/git.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        Git的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7" data-path="md/gulp.html">
            
                
                    <a href="../md/gulp.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        Gulp的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8" data-path="md/gitbook.html">
            
                
                    <a href="../md/gitbook.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        gitbook的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9" data-path="md/other.html">
            
                
                    <a href="../md/other.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.</b>
                        
                        小知识点
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >My NoteBook</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h3 id="&#x5C5E;&#x6027;&#x9009;&#x62E9;&#x5668;">&#x5C5E;&#x6027;&#x9009;&#x62E9;&#x5668;</h3>
<p><img src="../img/3.jpg"></p>
<pre><code>html:
&lt;p class=&quot;a&quot;&gt;&#x6D4B;&#x8BD5;&#x6570;&#x636E;1&lt;/p&gt;
&lt;p class=&quot;qq&quot;&gt;&#x6D4B;&#x8BD5;&#x6570;&#x636E;2&lt;/p&gt;
&lt;p class=&quot;xyz abc&quot;&gt;&#x6D4B;&#x8BD5;&#x6570;&#x636E;3&lt;/p&gt;
&lt;p class=&quot;aa123&quot;&gt;&#x6D4B;&#x8BD5;&#x6570;&#x636E;4&lt;/p&gt;
&lt;p class=&quot;test-abc&quot;&gt;&#x6D4B;&#x8BD5;&#x6570;&#x636E;5&lt;/p&gt;
&lt;p class=&quot;hello-z-world&quot;&gt;&#x6D4B;&#x8BD5;&#x6570;&#x636E;6&lt;/p&gt;
&lt;p class=&quot;y-1&quot;&gt;&#x6D4B;&#x8BD5;&#x6570;&#x636E;7&lt;/p&gt;
&lt;p class=&quot;y-2&quot;&gt;&#x6D4B;&#x8BD5;&#x6570;&#x636E;7&lt;/p&gt;
</code></pre><pre><code>css:
p[class]{color:green;}
p[class=&quot;qq&quot;]{color:red;}     
p[class~=&quot;abc&quot;]{color:blue;}
p[class^=&quot;aa&quot;]{color:yellow;}       
p[class$=&quot;abc&quot;]{color:black;}
p[class*=&quot;z&quot;]{color:orange;}
p[class|=&quot;y&quot;]{color:#ccc;}
</code></pre><p>&#x8FD0;&#x884C;&#x6548;&#x679C;&#xFF1A;</p>
<p class="a" style="color:green;">&#x6D4B;&#x8BD5;&#x6570;&#x636E;1</p>
<p class="qq" style="color:red;">&#x6D4B;&#x8BD5;&#x6570;&#x636E;2</p>
<p class="xyz abc" style="olor:blue;">&#x6D4B;&#x8BD5;&#x6570;&#x636E;3</p>
<p class="aa123" style="color:yellow;">&#x6D4B;&#x8BD5;&#x6570;&#x636E;4</p>
<p class="test-abc" style="color:black;">&#x6D4B;&#x8BD5;&#x6570;&#x636E;5</p>
<p class="hello-z-world" style="color:orange;">&#x6D4B;&#x8BD5;&#x6570;&#x636E;6</p>
<p class="y-1" style="color:#ccc;">&#x6D4B;&#x8BD5;&#x6570;&#x636E;7</p>
<p class="y-2" style="color:#ccc;">&#x6D4B;&#x8BD5;&#x6570;&#x636E;7</p>

<h3 id="&#x4F2A;&#x5BF9;&#x8C61;&#x9009;&#x62E9;&#x5668;">&#x4F2A;&#x5BF9;&#x8C61;&#x9009;&#x62E9;&#x5668;</h3>
<p><img src="../img/3.jpg"></p>
<pre><code>html:
</code></pre><pre><code>css:
p.t1::first-letter {font-size:20px;font-weight:bold;}/*&#x7B2C;&#x4E00;&#x4E2A;&#x5B57;&#x7B26;*/
</code></pre><p>&#x8FD0;&#x884C;&#x6548;&#x679C;&#xFF1A;</p>
<p class="t1"><span style="font-size:20px;font-weight:bold;">&#x6D4B;</span>&#x8BD5;css&#x7684;&#x4F2A;&#x5BF9;&#x8C61;&#x9009;&#x62E9;&#x7B26;&#xFF0C;&#x5929;&#x6C14;&#x6674;&#x6717;&#xFF0C;&#x9633;&#x5149;&#x660E;&#x5A9A;!</p>



                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../md/weilei.html" class="navigation navigation-prev " aria-label="Previous page: 伪类选择器"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../md/sass.html" class="navigation navigation-next " aria-label="Next page: sass的使用"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sectionx/sectionx.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"sectionx":{},"expandable-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
